/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hk.adv.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Lists;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.hk.sys.entity.user.HkUser;
import org.hibernate.validator.constraints.Length;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 企业广告管理Entity
 *
 * @author 罗天文
 * @version 2018-03-20
 */
public class HkEnterpriseAdv extends DataEntity<HkEnterpriseAdv> {

    private static final long serialVersionUID = 1L;
    private String title;        // 标题
    private String imgSrc;        // 地址
    private String link;        // 链接
    private String note;        // 说明
    private String imgRank;        // 序号
    private String category;        // 所属分类
    private String state;        // 状态
    private String enterpriseName;        // 企业名称
    private String integral;        // 积分
    private String goodsIds;        // 物品
    private String tag;        // 标签
    private String manageCategory;        // 管理分类
    private String countryId;        // 国家
    private String provinceId;        // 省
    private String cityId;        // 市
    private String integralCount;        // 总积分
    private String enterpriseId;        // 企业id
    private String comment;        // 是否评论
    private Date beginDate;        // 开始时间
    private Date endDate;        // 结束时间
    private String longitude;        // 经度
    private String latitude;        // 纬度
    private String coverImgSrc;        // 封面图片
    private String coverLink;        // 封面图片链接
    private String country;        // 国家
    private String province;        // 省
    private String city;        // 市
    private String vedioLength;//视频长度
    private String coverImgWidth;        // 封面图片
    private String coverImgHeight;        // 封面图片
    private String aimgSrc;        // 地址
    private String officiaVideo;  //官方视频地址
    private String officiaImgSrc; //官方视频封面地址
    private HkUser user;  //用户
    private String currencyType; //系统币种 1-乐豆 2-乐宝 3-饰品币 4-服务币
    private String officiaTitle;  //企业广告标题
    private String aofficiaVideo;  //官方视频地址 业务字段
    private String coverOfficiaImgSrcWidth;        // 封面图片
    private String coverOfficiaImgSrcHeight;        // 封面图片
    private List<HkEnterpriseProduct> hkEnterpriseProductList = Lists.newArrayList();		// 子表列表

    public List<HkEnterpriseProduct> getHkEnterpriseProductList() {
        return hkEnterpriseProductList;
    }

    public void setHkEnterpriseProductList(List<HkEnterpriseProduct> hkEnterpriseProductList) {
        this.hkEnterpriseProductList = hkEnterpriseProductList;
    }

    public String getAimgSrc() {
        return aimgSrc;
    }

    public void setAimgSrc(String aimgSrc) {
        this.aimgSrc = aimgSrc;
    }

    public String getCoverImgWidth() {
        return coverImgWidth;
    }

    public void setCoverImgWidth(String coverImgWidth) {
        this.coverImgWidth = coverImgWidth;
    }

    public String getCoverImgHeight() {
        return coverImgHeight;
    }

    public void setCoverImgHeight(String coverImgHeight) {
        this.coverImgHeight = coverImgHeight;
    }

    public String getVedioLength() {
        return vedioLength;
    }

    public void setVedioLength(String vedioLength) {
        this.vedioLength = vedioLength;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public HkEnterpriseAdv() {
        super();
    }

    public HkEnterpriseAdv(String id) {
        super(id);
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImgSrc() {
        return imgSrc;
    }

    public void setImgSrc(String imgSrc) {
        this.imgSrc = imgSrc;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getImgRank() {
        return imgRank;
    }

    public void setImgRank(String imgRank) {
        this.imgRank = imgRank;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    public String getIntegral() {
        return integral;
    }

    public void setIntegral(String integral) {
        this.integral = integral;
    }

    public String getGoodsIds() {
        return goodsIds;
    }

    public void setGoodsIds(String goodsIds) {
        this.goodsIds = goodsIds;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getManageCategory() {
        return manageCategory;
    }

    public void setManageCategory(String manageCategory) {
        this.manageCategory = manageCategory;
    }

    public String getCountryId() {
        return countryId;
    }

    public void setCountryId(String countryId) {
        this.countryId = countryId;
    }

    public String getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(String provinceId) {
        this.provinceId = provinceId;
    }

    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public String getIntegralCount() {
        return integralCount;
    }

    public void setIntegralCount(String integralCount) {
        this.integralCount = integralCount;
    }

    public String getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(String enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @Length(min = 0, max = 100, message = "经度长度必须介于 0 和 100 之间")
    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getCoverImgSrc() {
        return coverImgSrc;
    }

    public void setCoverImgSrc(String coverImgSrc) {
        this.coverImgSrc = coverImgSrc;
    }

    public String getCoverLink() {
        return coverLink;
    }

    public void setCoverLink(String coverLink) {
        this.coverLink = coverLink;
    }

    private List<String> tags;


    public void setTags(List<String> tags) {
        this.tags = tags;
    }

    private List<String> StringToList(String str, List list) {
        List<String> roleIdList = Lists.newArrayList();
        if (null != list) {
            roleIdList = list;
        } else {
            if (StringUtils.isNotEmpty(str)) {
                roleIdList = Arrays.asList(str.split(","));
            }
        }
        return roleIdList;
    }

    @JsonIgnore
    public List<String> getTags() {
        return StringToList(tag, tags);
    }

    public String getOfficiaVideo() {
        return officiaVideo;
    }

    public void setOfficiaVideo(String officiaVideo) {
        this.officiaVideo = officiaVideo;
    }

    public String getOfficiaImgSrc() {
        return officiaImgSrc;
    }

    public void setOfficiaImgSrc(String officiaImgSrc) {
        this.officiaImgSrc = officiaImgSrc;
    }

    public HkUser getUser() {
        return user;
    }

    public void setUser(HkUser user) {
        this.user = user;
    }

    public String getCurrencyType() {
        return currencyType;
    }

    public void setCurrencyType(String currencyType) {
        this.currencyType = currencyType;
    }

    public String getOfficiaTitle() {
        return officiaTitle;
    }

    public void setOfficiaTitle(String officiaTitle) {
        this.officiaTitle = officiaTitle;
    }

    public String getAofficiaVideo() {
        return aofficiaVideo;
    }

    public void setAofficiaVideo(String aofficiaVideo) {
        this.aofficiaVideo = aofficiaVideo;

    }

    public String getCoverOfficiaImgSrcWidth() {
        return coverOfficiaImgSrcWidth;
    }

    public void setCoverOfficiaImgSrcWidth(String coverOfficiaImgSrcWidth) {
        this.coverOfficiaImgSrcWidth = coverOfficiaImgSrcWidth;
    }

    public String getCoverOfficiaImgSrcHeight() {
        return coverOfficiaImgSrcHeight;
    }

    public void setCoverOfficiaImgSrcHeight(String coverOfficiaImgSrcHeight) {
        this.coverOfficiaImgSrcHeight = coverOfficiaImgSrcHeight;
    }
}